package com.ruomeng.robot.entity;

import org.apache.commons.lang.StringUtils;

import com.ruomeng.robot.util.ResourceFacade;
import com.ruomeng.robot.util.SpringContextUtil;

public class TgroupUpdateVO extends TgroupUpdate{
	private String goodsName;//-- 商品名称
	private String groupName;//-- 群名称
	private String shopType;//-- 店家类型1-淘宝 2-天mall 
	private String img;//-- 商品主图
	private String effectSales;//-- 月销量（当前销量）
	private String shopName;//-- 店铺名称
	private String commissionProportion;//-- 佣金
	private String voucherPrice;//-- 券后价
	private String commissionType;//-- 佣金比率类型 1-通用 2-定向 3-鹊桥 4营销
	private String count;// -- 券金额
	private String nowNumbers;//-- 当前领券量
	private String surplusCoupon;//-- 剩余券量
	private String message;//-- 文案
	private String img2;//文案图片
	private String sfm;//2小时前  2分钟前
    private Integer state;//优惠券状态 0-正常 1-过期 2-失效
    private String itemId;//商品id
    private String sellerId;//店铺id
    private String goodType;//1聚划算  2淘抢购 0普通 
    
    
	
	private String groupIds;//群Id
	private Integer pageSize;//页数
	private Integer type;//1综合  2实时上新  3销量榜  4领取榜  5品质好货  6人气排行   7 聚淘
	private String searchName;//搜索使用
	private Integer flag;//销量榜中的2小时销量还是当天全天销量    1两小时   2当天全天销量  3 48小时  4 72小时
	private Integer salesAdd;//两小时或全天增量
	
	
	//排序=====================================================start
	private Integer goodSort;// 0最新  1价格  2销量 3佣金 4领券量  5优惠力度
	//排序=====================================================end
	private Integer goodTimeSort; //0 全部 1当天 2近三天
	
	
	private Integer num_online;  //现在人数
	
    private String usercode; //用户编码
    
    private int comefrom; //提交源
      
    private int examine_status;//审核状态
    
    private int pageIndex;
    
    private String submitPerson;
    private String icon;
    
    private String coupon_id;
    
    private int search;
    
    
    
    
    
   
	
	public int getSearch() {
		return search;
	}
	public void setSearch(int search) {
		this.search = search;
	}
	public String getCoupon_id() {
		return coupon_id;
	}
	public void setCoupon_id(String coupon_id) {
		this.coupon_id = coupon_id;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getSubmitPerson() {
		return submitPerson;
	}
	public void setSubmitPerson(String submitPerson) {
		this.submitPerson = submitPerson;
	}
	public int getPageIndex() {
		return pageIndex;
	}
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}
	public String getImg() {
		if(img==null)
		{
			return null;
		}
		else
		{
			if(img.indexOf("qn|ruomeng|")!=-1)
			{
				ResourceFacade resourceFacade = SpringContextUtil.getBean(ResourceFacade.class);
			    String imgUrl = resourceFacade.resolveUrl(img);
			    return imgUrl;
			}
			else
			{
				if(img.indexOf("http://")!=-1)
				{
					return img;
				}
				else if (img.indexOf("https://")!=-1) {
					return img;
				}
				else
				{
					return "https:"+img;
				}
			}
		}
	}
	public void setImg(String img) {
		this.img = img;
	}

	public String getImg2() {
		if(StringUtils.isEmpty(img2))
		{
			return "https://img.alicdn.com/imgextra/i4/1072286858/TB2xuvQt3NlpuFjy0FfXXX3CpXa_!!1072286858.png";
		}
		else
		{
			if(img2.indexOf("qn|ruomeng|")!=-1)
			{
				ResourceFacade resourceFacade = SpringContextUtil.getBean(ResourceFacade.class);
			    String imgUrl = resourceFacade.resolveUrl(img2);
			    return imgUrl;
			}
			return "http://img.taobao218.com/"+img2;
		}
	}
	public void setImg2(String img2) {
		this.img2 = img2;
	}
	public String getGoodsName() {
		return goodsName;
	}
	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	public String getGroupName() {
		return groupName;
	}
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
	public String getShopType() {
		return shopType;
	}
	public void setShopType(String shopType) {
		this.shopType = shopType;
	}
	public String getEffectSales() {
		return effectSales;
	}
	public void setEffectSales(String effectSales) {
		this.effectSales = effectSales;
	}
	public String getShopName() {
		return shopName;
	}
	public void setShopName(String shopName) {
		this.shopName = shopName;
	}
	public String getCommissionProportion() {
		return commissionProportion;
	}
	public void setCommissionProportion(String commissionProportion) {
		this.commissionProportion = commissionProportion;
	}
	public String getVoucherPrice() {
		return voucherPrice;
	}
	public void setVoucherPrice(String voucherPrice) {
		this.voucherPrice = voucherPrice;
	}
	public String getCommissionType() {
		return commissionType;
	}
	public void setCommissionType(String commissionType) {
		this.commissionType = commissionType;
	}
	public String getCount() {
		return count;
	}
	public void setCount(String count) {
		this.count = count;
	}
	public String getNowNumbers() {
		return nowNumbers;
	}
	public void setNowNumbers(String nowNumbers) {
		this.nowNumbers = nowNumbers;
	}
	public String getSurplusCoupon() {
		return surplusCoupon;
	}
	public void setSurplusCoupon(String surplusCoupon) {
		this.surplusCoupon = surplusCoupon;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getSfm() {
		return sfm;
	}
	public void setSfm(String sfm) {
		this.sfm = sfm;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public String getItemId() {
		return itemId;
	}
	public void setItemId(String itemId) {
		this.itemId = itemId;
	}
	public String getSellerId() {
		return sellerId;
	}
	public void setSellerId(String sellerId) {
		this.sellerId = sellerId;
	}
	public String getGoodType() {
		return goodType;
	}
	public void setGoodType(String goodType) {
		this.goodType = goodType;
	}
	public String getGroupIds() {
		return groupIds;
	}
	public void setGroupIds(String groupIds) {
		this.groupIds = groupIds;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public String getSearchName() {
		return searchName;
	}
	public void setSearchName(String searchName) {
		this.searchName = searchName;
	}
	public Integer getFlag() {
		return flag;
	}
	public void setFlag(Integer flag) {
		this.flag = flag;
	}
	public Integer getSalesAdd() {
		return salesAdd;
	}
	public void setSalesAdd(Integer salesAdd) {
		this.salesAdd = salesAdd;
	}
	public Integer getGoodSort() {
		return goodSort;
	}
	public void setGoodSort(Integer goodSort) {
		this.goodSort = goodSort;
	}
	public Integer getGoodTimeSort() {
		return goodTimeSort;
	}
	public void setGoodTimeSort(Integer goodTimeSort) {
		this.goodTimeSort = goodTimeSort;
	}
	public Integer getNum_online() {
		return num_online;
	}
	public void setNum_online(Integer num_online) {
		this.num_online = num_online;
	}
	public String getUsercode() {
		return usercode;
	}
	public void setUsercode(String usercode) {
		this.usercode = usercode;
	}
	public int getComefrom() {
		return comefrom;
	}
	public void setComefrom(int comefrom) {
		this.comefrom = comefrom;
	}
	public int getExamine_status() {
		return examine_status;
	}
	public void setExamine_status(int examine_status) {
		this.examine_status = examine_status;
	}
	
	
	

}
